<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: FootnoteFilter</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">FootnoteFilter</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../files/vendor/plugins/redit/lib/redit_footnotes_rb.html">
                vendor/plugins/redit/lib/redit_footnotes.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                Object
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000003">add_footnotes!</a>&nbsp;&nbsp;
      <a href="#M000026">asset_file_links</a>&nbsp;&nbsp;
      <a href="#M000015">content_type</a>&nbsp;&nbsp;
      <a href="#M000004">controller_filename</a>&nbsp;&nbsp;
      <a href="#M000007">controller_line_number</a>&nbsp;&nbsp;
      <a href="#M000005">controller_text</a>&nbsp;&nbsp;
      <a href="#M000018">controller_url</a>&nbsp;&nbsp;
      <a href="#M000029">escape</a>&nbsp;&nbsp;
      <a href="#M000001">filter</a>&nbsp;&nbsp;
      <a href="#M000009">first_render?</a>&nbsp;&nbsp;
      <a href="#M000027">indent</a>&nbsp;&nbsp;
      <a href="#M000006">index_of_method</a>&nbsp;&nbsp;
      <a href="#M000022">insert_footnotes</a>&nbsp;&nbsp;
      <a href="#M000021">insert_styles</a>&nbsp;&nbsp;
      <a href="#M000028">insert_text</a>&nbsp;&nbsp;
      <a href="#M000017">javascript_files</a>&nbsp;&nbsp;
      <a href="#M000014">layout_file_name</a>&nbsp;&nbsp;
      <a href="#M000020">layout_url</a>&nbsp;&nbsp;
      <a href="#M000025">log_tail</a>&nbsp;&nbsp;
      <a href="#M000002">new</a>&nbsp;&nbsp;
      <a href="#M000008">performed_render?</a>&nbsp;&nbsp;
      <a href="#M000024">redit_links</a>&nbsp;&nbsp;
      <a href="#M000016">stylesheet_files</a>&nbsp;&nbsp;
      <a href="#M000012">template_extension</a>&nbsp;&nbsp;
      <a href="#M000013">template_file_name</a>&nbsp;&nbsp;
      <a href="#M000011">template_path</a>&nbsp;&nbsp;
      <a href="#M000023">tm_footnotes_toggle</a>&nbsp;&nbsp;
      <a href="#M000019">view_url</a>&nbsp;&nbsp;
      <a href="#M000010">xhr?</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">abs_root</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">body</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000001" class="method-detail">
        <a name="M000001"></a>

        <div class="method-heading">
          <a href="#M000001" class="method-signature">
          <span class="method-name">filter</span><span class="method-args">(controller)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000001-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 24</span>
24:   <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">filter</span>(<span class="ruby-identifier">controller</span>)
25:     <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">render_without_footnotes</span>
26:     <span class="ruby-identifier">filter</span> = <span class="ruby-constant">FootnoteFilter</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">controller</span>)
27:     <span class="ruby-identifier">filter</span>.<span class="ruby-identifier">add_footnotes!</span>
28:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000002" class="method-detail">
        <a name="M000002"></a>

        <div class="method-heading">
          <a href="#M000002" class="method-signature">
          <span class="method-name">new</span><span class="method-args">(controller)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000002-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 30</span>
30:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">controller</span>)
31:     <span class="ruby-ivar">@controller</span> = <span class="ruby-identifier">controller</span>
32:     <span class="ruby-ivar">@template</span> = <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-value str">&quot;@template&quot;</span>)
33:     <span class="ruby-ivar">@body</span> = <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>
34:     <span class="ruby-ivar">@extra_html</span> = <span class="ruby-value str">&quot;&quot;</span>
35:     <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">abs_root</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">RAILS_ROOT</span>)
36:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000003" class="method-detail">
        <a name="M000003"></a>

        <div class="method-heading">
          <a href="#M000003" class="method-signature">
          <span class="method-name">add_footnotes!</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000003-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 38</span>
38:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_footnotes!</span>
39:     <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">performed_render?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">first_render?</span>
40:       <span class="ruby-keyword kw">if</span> [<span class="ruby-value str">&quot;rhtml&quot;</span>, <span class="ruby-value str">&quot;rxhtml&quot;</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">template_extension</span>) <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">content_type</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/html/</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">content_type</span>.<span class="ruby-identifier">nil?</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">xhr?</span>
41:         <span class="ruby-comment cmt"># If the user would like to be responsible for the styles, let them opt out of the styling here</span>
42:         <span class="ruby-identifier">insert_styles</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">FootnoteFilter</span>.<span class="ruby-identifier">no_style</span>
43:         <span class="ruby-identifier">insert_footnotes</span>
44:       <span class="ruby-keyword kw">end</span>
45:     <span class="ruby-keyword kw">end</span>
46:   <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
47:     <span class="ruby-comment cmt"># Discard footnotes if there are any problems</span>
48:     <span class="ruby-constant">RAILS_DEFAULT_LOGGER</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">&quot;Redit Footnotes Exception: #{e}\n#{e.backtrace.join(&quot;\n&quot;)}&quot;</span>
49:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000026" class="method-detail">
        <a name="M000026"></a>

        <div class="method-heading">
          <a href="#M000026" class="method-signature">
          <span class="method-name">asset_file_links</span><span class="method-args">(link_text, files)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000026-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 215</span>
215:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">asset_file_links</span>(<span class="ruby-identifier">link_text</span>, <span class="ruby-identifier">files</span>)
216:     <span class="ruby-keyword kw">return</span> <span class="ruby-value str">''</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">files</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
217:     <span class="ruby-identifier">links</span> = <span class="ruby-identifier">files</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">filename</span><span class="ruby-operator">|</span>
218:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filename</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">%r{^/}</span>
219:         <span class="ruby-identifier">full_filename</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">abs_root</span>, <span class="ruby-value str">&quot;public&quot;</span>, <span class="ruby-identifier">filename</span>)
220:         <span class="ruby-node">%{&lt;a href=&quot;#{redit_prefix}#{full_filename.reditify}&quot;&gt;#{filename}&lt;/a&gt;}</span>
221:       <span class="ruby-keyword kw">else</span>
222:         <span class="ruby-node">%{&lt;a href=&quot;#{filename}&quot;&gt;#{filename}&lt;/a&gt;}</span>
223:       <span class="ruby-keyword kw">end</span>
224:     <span class="ruby-keyword kw">end</span>
225:     <span class="ruby-ivar">@extra_html</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;&lt;fieldset id=\&quot;tm_footnotes_\#{link_text.underscore.gsub(' ', '_')}\&quot; class=\&quot;tm_footnotes_debug_info\&quot; style=\&quot;display: none\&quot;&gt;\n&lt;legend&gt;\#{link_text}&lt;/legend&gt;\n&lt;ul&gt;&lt;li&gt;\#{links.join(\&quot;&lt;/li&gt;&lt;li&gt;\&quot;)}&lt;/li&gt;&lt;/ul&gt;\n&lt;/fieldset&gt;\n&quot;</span>
226:     <span class="ruby-comment cmt"># Return the link that will open the 'extra html' div</span>
227:     <span class="ruby-node">%{ | &lt;a href=&quot;#&quot; onclick=&quot;#{tm_footnotes_toggle('tm_footnotes_' + link_text.underscore.gsub(' ', '_') )}; return false&quot;&gt;#{link_text}&lt;/a&gt;}</span>
228:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000015" class="method-detail">
        <a name="M000015"></a>

        <div class="method-heading">
          <a href="#M000015" class="method-signature">
          <span class="method-name">content_type</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000015-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 99</span>
 99:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">content_type</span>
100:     <span class="ruby-ivar">@controller</span>.<span class="ruby-identifier">response</span>.<span class="ruby-identifier">headers</span>[<span class="ruby-value str">'Content-Type'</span>]
101:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000004" class="method-detail">
        <a name="M000004"></a>

        <div class="method-heading">
          <a href="#M000004" class="method-signature">
          <span class="method-name">controller_filename</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <table>
<tr><td valign="top">Some controller classes come with the Controller:</td><td>module and some don&#8216;t

</td></tr>
</table>
<p>
(anyone know why? &#8212; Duane)
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000004-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 53</span>
53:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">controller_filename</span>
54:     <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">abs_root</span>, <span class="ruby-value str">&quot;app&quot;</span>, <span class="ruby-value str">&quot;controllers&quot;</span>, <span class="ruby-node">&quot;#{@controller.class.to_s.underscore}.rb&quot;</span>).
55:     <span class="ruby-identifier">sub</span>(<span class="ruby-value str">'/controllers/controllers/'</span>, <span class="ruby-value str">'/controllers/'</span>)
56:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000007" class="method-detail">
        <a name="M000007"></a>

        <div class="method-heading">
          <a href="#M000007" class="method-signature">
          <span class="method-name">controller_line_number</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000007-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 66</span>
66:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">controller_line_number</span>
67:     <span class="ruby-identifier">controller_text</span>.<span class="ruby-identifier">line_from_index</span>(<span class="ruby-identifier">index_of_method</span>)
68:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000005" class="method-detail">
        <a name="M000005"></a>

        <div class="method-heading">
          <a href="#M000005" class="method-signature">
          <span class="method-name">controller_text</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000005-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 58</span>
58:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">controller_text</span>
59:     <span class="ruby-ivar">@controller_text</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">IO</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">controller_filename</span>)
60:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000018" class="method-detail">
        <a name="M000018"></a>

        <div class="method-heading">
          <a href="#M000018" class="method-signature">
          <span class="method-name">controller_url</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000018-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 111</span>
111:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">controller_url</span>
112:     <span class="ruby-identifier">escape</span>(
113:       <span class="ruby-identifier">redit_prefix</span> <span class="ruby-operator">+</span>
114:       <span class="ruby-identifier">controller_filename</span>.<span class="ruby-identifier">reditify</span> <span class="ruby-operator">+</span>
115:       (<span class="ruby-identifier">index_of_method</span> <span class="ruby-value">? </span><span class="ruby-node">&quot;?line=#{controller_line_number + 1}&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-value str">&quot;&quot;</span>)
116:     )
117:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000029" class="method-detail">
        <a name="M000029"></a>

        <div class="method-heading">
          <a href="#M000029" class="method-signature">
          <span class="method-name">escape</span><span class="method-args">(text)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000029-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 268</span>
268:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escape</span>(<span class="ruby-identifier">text</span>)
269:     <span class="ruby-identifier">text</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">&quot;&amp;&quot;</span>, <span class="ruby-value str">&quot;&amp;amp;&quot;</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">&quot;&lt;&quot;</span>, <span class="ruby-value str">&quot;&amp;lt;&quot;</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">&quot;&gt;&quot;</span>, <span class="ruby-value str">&quot;&amp;gt;&quot;</span>)
270:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000009" class="method-detail">
        <a name="M000009"></a>

        <div class="method-heading">
          <a href="#M000009" class="method-signature">
          <span class="method-name">first_render?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000009-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 74</span>
74:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">first_render?</span>
75:     <span class="ruby-ivar">@template</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:first_render</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@template</span>.<span class="ruby-identifier">first_render</span>
76:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000027" class="method-detail">
        <a name="M000027"></a>

        <div class="method-heading">
          <a href="#M000027" class="method-signature">
          <span class="method-name">indent</span><span class="method-args">(indentation, text)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000027-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 236</span>
236:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">indent</span>(<span class="ruby-identifier">indentation</span>, <span class="ruby-identifier">text</span>)
237:     <span class="ruby-identifier">lines</span> = <span class="ruby-identifier">text</span>.<span class="ruby-identifier">to_a</span>
238:     <span class="ruby-identifier">initial_indentation</span> = <span class="ruby-identifier">lines</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">/^(\s+)/</span>).<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">first</span>
239:     <span class="ruby-identifier">lines</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
240:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">initial_indentation</span>.<span class="ruby-identifier">nil?</span>
241:         <span class="ruby-value str">&quot; &quot;</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">indentation</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">line</span>
242:       <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">initial_indentation</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
243:         <span class="ruby-value str">&quot; &quot;</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">indentation</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">line</span>[<span class="ruby-identifier">initial_indentation</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
244:       <span class="ruby-keyword kw">else</span>
245:         <span class="ruby-value str">&quot; &quot;</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">indentation</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">line</span>
246:       <span class="ruby-keyword kw">end</span>
247:     <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">join</span>
248:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000006" class="method-detail">
        <a name="M000006"></a>

        <div class="method-heading">
          <a href="#M000006" class="method-signature">
          <span class="method-name">index_of_method</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000006-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 62</span>
62:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">index_of_method</span>
63:     (<span class="ruby-identifier">controller_text</span> <span class="ruby-operator">=~</span> <span class="ruby-node">/def\s+#{@controller.action_name}[\s\(]/</span>)
64:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000022" class="method-detail">
        <a name="M000022"></a>

        <div class="method-heading">
          <a href="#M000022" class="method-signature">
          <span class="method-name">insert_footnotes</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000022-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 141</span>
141:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">insert_footnotes</span>
142:     
143:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tm_footnotes_toggle</span>(<span class="ruby-identifier">id</span>)
144:       <span class="ruby-node">&quot;s = document.getElementById('#{id}').style; if(s.display == 'none') { s.display = '' } else { s.display = 'none' }&quot;</span>
145:     <span class="ruby-keyword kw">end</span>
146:     
147:     <span class="ruby-identifier">footnotes_html</span> = <span class="ruby-value str">&quot;&lt;!-- Redit Footnotes --&gt;\n&lt;div style=\&quot;clear:both\&quot;&gt;&lt;/div&gt;\n&lt;div id=\&quot;tm_footnotes_debug\&quot;&gt;\n\#{redit_links}\nShow:\n&lt;a href=\&quot;#\&quot; onclick=\&quot;\#{tm_footnotes_toggle('session_debug_info')};return false\&quot;&gt;Session&lt;/a&gt; |\n&lt;a href=\&quot;#\&quot; onclick=\&quot;\#{tm_footnotes_toggle('cookies_debug_info')};return false\&quot;&gt;Cookies&lt;/a&gt; |\n&lt;a href=\&quot;#\&quot; onclick=\&quot;\#{tm_footnotes_toggle('params_debug_info')};return false\&quot;&gt;Params&lt;/a&gt; |\n&lt;a href=\&quot;#\&quot; onclick=\&quot;\#{tm_footnotes_toggle('log_debug_info')};return false\&quot;&gt;Log&lt;/a&gt; |\n&lt;a href=\&quot;#\&quot; onclick=\&quot;\#{tm_footnotes_toggle('general_debug_info')};return false\&quot;&gt;General Debug&lt;/a&gt;\n&lt;br/&gt;(&lt;a href=\&quot;http://antono.info/en/redit/\&quot;&gt;&lt;b&gt;Redit Footnotes&lt;/b&gt;&lt;/a&gt;)\n\#{@extra_html}\n&lt;fieldset id=\&quot;session_debug_info\&quot; class=\&quot;tm_footnotes_debug_info\&quot; style=\&quot;display: none\&quot;&gt;\n&lt;legend&gt;Session&lt;/legend&gt;\n\#{escape(@controller.session.instance_variable_get(\&quot;@data\&quot;).inspect)}\n&lt;/fieldset&gt;\n&lt;fieldset id=\&quot;cookies_debug_info\&quot; class=\&quot;tm_footnotes_debug_info\&quot; style=\&quot;display: none\&quot;&gt;\n&lt;legend&gt;Cookies&lt;/legend&gt;\n&lt;code&gt;\#{escape(@controller.send(:cookies).inspect)}&lt;/code&gt;\n&lt;/fieldset&gt;\n&lt;fieldset id=\&quot;params_debug_info\&quot; class=\&quot;tm_footnotes_debug_info\&quot; style=\&quot;display: none\&quot;&gt;\n&lt;legend&gt;Params&lt;/legend&gt;\n&lt;code&gt;\#{escape(@controller.params.inspect)}&lt;/code&gt;\n&lt;/fieldset&gt;\n&lt;fieldset id=\&quot;log_debug_info\&quot; class=\&quot;tm_footnotes_debug_info\&quot; style=\&quot;display: none\&quot;&gt;\n&lt;legend&gt;Log&lt;/legend&gt;\n&lt;code&gt;&lt;pre&gt;\#{escape(log_tail)}&lt;/pre&gt;&lt;/code&gt;\n&lt;/fieldset&gt;\n&lt;fieldset id=\&quot;general_debug_info\&quot; class=\&quot;tm_footnotes_debug_info\&quot; style=\&quot;display: none\&quot;&gt;\n&lt;legend&gt;General (id=\&quot;tm_debug\&quot;)&lt;/legend&gt;\n&lt;div id=\&quot;tm_debug\&quot;&gt;&lt;/div&gt;\n&lt;/fieldset&gt;\n&lt;/div&gt;\n&lt;!-- End Redit Footnotes --&gt;\n&quot;</span>
148:     <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@body</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">%r{&lt;div[^&gt;]+id=['&quot;]tm_footnotes['&quot;][^&gt;]*&gt;}</span>
149:       <span class="ruby-comment cmt"># Insert inside the &quot;tm_footnotes&quot; div if it exists</span>
150:       <span class="ruby-identifier">insert_text</span> <span class="ruby-identifier">:after</span>, <span class="ruby-regexp re">%r{&lt;div[^&gt;]+id=['&quot;]tm_footnotes['&quot;][^&gt;]*&gt;}</span>, <span class="ruby-identifier">footnotes_html</span>
151:     <span class="ruby-keyword kw">else</span>
152:       <span class="ruby-comment cmt"># Otherwise, try to insert as the last part of the html body</span>
153:       <span class="ruby-identifier">insert_text</span> <span class="ruby-identifier">:before</span>, <span class="ruby-regexp re">/&lt;\/body&gt;/i</span>, <span class="ruby-identifier">footnotes_html</span>
154:     <span class="ruby-keyword kw">end</span>
155:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000021" class="method-detail">
        <a name="M000021"></a>

        <div class="method-heading">
          <a href="#M000021" class="method-signature">
          <span class="method-name">insert_styles</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000021-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 127</span>
127:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">insert_styles</span>
128:     <span class="ruby-identifier">insert_text</span> <span class="ruby-identifier">:before</span>, <span class="ruby-regexp re">/&lt;\/head&gt;/i</span>, <span class="ruby-value str">&quot;&lt;!-- Redit Footnotes Style --&gt;\n&lt;style type=\&quot;text/css\&quot;&gt;\n#tm_footnotes_debug {margin-top: 0.5em; text-align: center; color: #999;}\n#tm_footnotes_debug a {text-decoration: none; color: #bbb;}\n#tm_footnotes_debug pre {overflow: scroll;}\nfieldset.tm_footnotes_debug_info {text-align: left; border: 1px dashed #aaa; padding: 1em; margin: 1em 2em 1em 2em; color: #777;}\n&lt;/style&gt;\n&lt;!-- End Redit Footnotes Style --&gt;\n&quot;</span>
129:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000028" class="method-detail">
        <a name="M000028"></a>

        <div class="method-heading">
          <a href="#M000028" class="method-signature">
          <span class="method-name">insert_text</span><span class="method-args">(position, pattern, new_text, indentation = 4)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Inserts text in to the body of the document <tt>pattern</tt> is a Regular
expression which, when matched, will cause <tt>new_text</tt> to be inserted
before or after the match. If no match is found, <tt>new_text</tt> is
appended to the body instead. <tt>position</tt> may be either :before or
:after
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000028-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 254</span>
254:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">insert_text</span>(<span class="ruby-identifier">position</span>, <span class="ruby-identifier">pattern</span>, <span class="ruby-identifier">new_text</span>, <span class="ruby-identifier">indentation</span> = <span class="ruby-value">4</span>)
255:     <span class="ruby-identifier">index</span> = <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">pattern</span>
256:       <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Regexp</span>
257:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">match</span> = <span class="ruby-ivar">@body</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">pattern</span>)
258:           <span class="ruby-identifier">match</span>.<span class="ruby-identifier">offset</span>(<span class="ruby-value">0</span>)[<span class="ruby-identifier">position</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:before</span> <span class="ruby-operator">?</span> <span class="ruby-value">0</span> <span class="ruby-operator">:</span> <span class="ruby-value">1</span>]
259:         <span class="ruby-keyword kw">else</span>
260:           <span class="ruby-ivar">@body</span>.<span class="ruby-identifier">size</span>
261:         <span class="ruby-keyword kw">end</span>
262:       <span class="ruby-keyword kw">else</span>
263:         <span class="ruby-identifier">pattern</span>
264:       <span class="ruby-keyword kw">end</span>
265:     <span class="ruby-ivar">@body</span>.<span class="ruby-identifier">insert</span> <span class="ruby-identifier">index</span>, <span class="ruby-identifier">indent</span>(<span class="ruby-identifier">indentation</span>, <span class="ruby-identifier">new_text</span>)
266:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000017" class="method-detail">
        <a name="M000017"></a>

        <div class="method-heading">
          <a href="#M000017" class="method-signature">
          <span class="method-name">javascript_files</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000017-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 107</span>
107:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">javascript_files</span>
108:     <span class="ruby-ivar">@javascript_files</span> <span class="ruby-operator">||=</span> <span class="ruby-ivar">@body</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">/&lt;script[^&gt;]+src\s*=\s*['&quot;]([^&gt;?'&quot;]+)/i</span><span class="ruby-identifier">m</span>).<span class="ruby-identifier">flatten</span>
109:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000014" class="method-detail">
        <a name="M000014"></a>

        <div class="method-heading">
          <a href="#M000014" class="method-signature">
          <span class="method-name">layout_file_name</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000014-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 95</span>
95:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">layout_file_name</span>
96:     <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-ivar">@template</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">:full_template_path</span>, <span class="ruby-ivar">@controller</span>.<span class="ruby-identifier">active_layout</span>, <span class="ruby-value str">&quot;rhtml&quot;</span>))
97:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000020" class="method-detail">
        <a name="M000020"></a>

        <div class="method-heading">
          <a href="#M000020" class="method-signature">
          <span class="method-name">layout_url</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000020-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 123</span>
123:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">layout_url</span>
124:     <span class="ruby-identifier">escape</span>(<span class="ruby-identifier">redit_prefix</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">layout_file_name</span>.<span class="ruby-identifier">reditify</span>)
125:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000025" class="method-detail">
        <a name="M000025"></a>

        <div class="method-heading">
          <a href="#M000025" class="method-signature">
          <span class="method-name">log_tail</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000025-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 210</span>
210:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_tail</span>
211:     <span class="ruby-identifier">ansi</span> = <span class="ruby-node">`tail -n 200 #{RAILS_DEFAULT_LOGGER.instance_variable_get(&quot;@logdev&quot;).filename}`</span>
212:     <span class="ruby-identifier">html</span> = <span class="ruby-identifier">ansi</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\e\[.+?m/</span>, <span class="ruby-value str">''</span>)
213:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000008" class="method-detail">
        <a name="M000008"></a>

        <div class="method-heading">
          <a href="#M000008" class="method-signature">
          <span class="method-name">performed_render?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000008-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 70</span>
70:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">performed_render?</span>
71:     <span class="ruby-ivar">@controller</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-value str">&quot;@performed_render&quot;</span>)
72:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000024" class="method-detail">
        <a name="M000024"></a>

        <div class="method-heading">
          <a href="#M000024" class="method-signature">
          <span class="method-name">redit_links</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000024-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 193</span>
193:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">redit_links</span>
194:     <span class="ruby-identifier">html</span> = <span class="ruby-value str">&quot;&quot;</span>
195:     <span class="ruby-keyword kw">if</span> <span class="ruby-operator">::</span><span class="ruby-constant">UNIKSO</span>
196:       <span class="ruby-identifier">html</span> = <span class="ruby-value str">&quot;Edit:\n&lt;a href=\&quot;\#{controller_url}\&quot;&gt;Controller&lt;/a&gt; |\n&lt;a href=\&quot;\#{view_url}\&quot;&gt;View&lt;/a&gt; |\n&lt;a href=\&quot;\#{layout_url}\&quot;&gt;Layout&lt;/a&gt;\n&quot;</span>
197:       <span class="ruby-identifier">html</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">asset_file_links</span>(<span class="ruby-value str">&quot;Stylesheets&quot;</span>, <span class="ruby-identifier">stylesheet_files</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">stylesheet_files</span>.<span class="ruby-identifier">blank?</span>
198:       <span class="ruby-identifier">html</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">asset_file_links</span>(<span class="ruby-value str">&quot;Javascripts&quot;</span>, <span class="ruby-identifier">javascript_files</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">javascript_files</span>.<span class="ruby-identifier">blank?</span>
199:       <span class="ruby-identifier">html</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">&quot;&lt;br/&gt;&quot;</span>
200:     <span class="ruby-keyword kw">end</span>
201:     <span class="ruby-identifier">html</span>
202:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000016" class="method-detail">
        <a name="M000016"></a>

        <div class="method-heading">
          <a href="#M000016" class="method-signature">
          <span class="method-name">stylesheet_files</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000016-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 103</span>
103:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stylesheet_files</span>
104:     <span class="ruby-ivar">@stylesheet_files</span> <span class="ruby-operator">||=</span> <span class="ruby-ivar">@body</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">/&lt;link[^&gt;]+href\s*=\s*['&quot;]([^&gt;?'&quot;]+)/i</span><span class="ruby-identifier">m</span>).<span class="ruby-identifier">flatten</span>
105:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000012" class="method-detail">
        <a name="M000012"></a>

        <div class="method-heading">
          <a href="#M000012" class="method-signature">
          <span class="method-name">template_extension</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000012-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 86</span>
86:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">template_extension</span>
87:     <span class="ruby-ivar">@template</span>.<span class="ruby-identifier">first_render</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">/\.(rhtml|rxhtml|rxml|rjs)$/</span>).<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">||</span>
88:     <span class="ruby-ivar">@template</span>.<span class="ruby-identifier">pick_template_extension</span>(<span class="ruby-identifier">template_path</span>).<span class="ruby-identifier">to_s</span>
89:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000013" class="method-detail">
        <a name="M000013"></a>

        <div class="method-heading">
          <a href="#M000013" class="method-signature">
          <span class="method-name">template_file_name</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000013-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 91</span>
91:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">template_file_name</span>
92:     <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-ivar">@template</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">:full_template_path</span>, <span class="ruby-identifier">template_path</span>, <span class="ruby-identifier">template_extension</span>))
93:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000011" class="method-detail">
        <a name="M000011"></a>

        <div class="method-heading">
          <a href="#M000011" class="method-signature">
          <span class="method-name">template_path</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000011-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 82</span>
82:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">template_path</span>
83:     <span class="ruby-ivar">@template</span>.<span class="ruby-identifier">first_render</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/\.(rhtml|rxhtml|rxml|rjs)$/</span>, <span class="ruby-value str">&quot;&quot;</span>)
84:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000023" class="method-detail">
        <a name="M000023"></a>

        <div class="method-heading">
          <a href="#M000023" class="method-signature">
          <span class="method-name">tm_footnotes_toggle</span><span class="method-args">(id)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000023-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 143</span>
143:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tm_footnotes_toggle</span>(<span class="ruby-identifier">id</span>)
144:       <span class="ruby-node">&quot;s = document.getElementById('#{id}').style; if(s.display == 'none') { s.display = '' } else { s.display = 'none' }&quot;</span>
145:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000019" class="method-detail">
        <a name="M000019"></a>

        <div class="method-heading">
          <a href="#M000019" class="method-signature">
          <span class="method-name">view_url</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000019-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 119</span>
119:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">view_url</span>
120:     <span class="ruby-identifier">escape</span>(<span class="ruby-identifier">redit_prefix</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">template_file_name</span>.<span class="ruby-identifier">reditify</span>)
121:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000010" class="method-detail">
        <a name="M000010"></a>

        <div class="method-heading">
          <a href="#M000010" class="method-signature">
          <span class="method-name">xhr?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000010-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/redit/lib/redit_footnotes.rb, line 78</span>
78:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xhr?</span>
79:     <span class="ruby-ivar">@controller</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">xhr?</span>
80:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>